<!--
 * @Descripttion: 工作计划
 * @version: V1.0
 * @Author: GW
 * @Date: 2021-07-29 10:40:41
 * @LastEditors: GW
 * @LastEditTime: 2022-04-08 11:51:51
-->

<template>
    <nly-content-wrapper>
        <div class="work-content-wrapper">
            <!--按钮-->
            <div class="btn-wrapper clearfix">
                <a-row class="text-center clearfix">
                    <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="12">
                        <a-col :class="tabKey!=1?'btns-disable':''" :xs="btnGrid.xs" :sm="btnGrid.sm" :md="btnGrid.md" :lg="btnGrid.lg" :xl="btnGrid.xl">
                            <div class="btns" @click="tabKey==1?AddItem():''">
                                <a-icon class="btns-icon" type="file-add" />
                                <div class="btns-text">新增</div>
                            </div>
                        </a-col>
                        <a-col :class="tabKey!=1?'btns-disable':''" :xs="btnGrid.xs" :sm="btnGrid.sm" :md="btnGrid.md" :lg="btnGrid.lg" :xl="btnGrid.xl">
                            <div class="btns" @click="tabKey==1?EdiItem():''">
                                <a-icon class="btns-icon" type="edit" />
                                <div class="btns-text">编辑</div>
                            </div>
                        </a-col>
                        <a-col :class="tabKey!=1?'btns-disable':''" :xs="btnGrid.xs" :sm="btnGrid.sm" :md="btnGrid.md" :lg="btnGrid.lg" :xl="btnGrid.xl">
                            <div style="position:relative">
                                <div class="btns" @click="tabKey==1?deleteForm():''">
                                    <a-icon class="btns-icon" type="delete" />
                                    <div class="btns-text">删除</div>
                                </div>
                                <div style="position:absolute;width:2px;height:36px;border-radius:6px;background:#ccc;top:0px;right:0px;"></div>
                            </div>
                        </a-col>
                        <a-col :class="tabKey!=1?'btns-disable':''" :xs="btnGrid.xs" :sm="btnGrid.sm" :md="btnGrid.md" :lg="btnGrid.lg" :xl="btnGrid.xl">
                            <div class="btns" @click="tabKey==1?showSubmitPeople():''">
                                <a-icon class="btns-icon" type="save" />
                                <div class="btns-text">提交</div>
                            </div>
                        </a-col>
                        <a-col :class="tabKey!=1?'btns-disable':''" :xs="btnGrid.xs" :sm="btnGrid.sm" :md="btnGrid.md" :lg="btnGrid.lg" :xl="btnGrid.xl">
                            <div class="btns" @click="tabKey==1?returnPlan():''">
                                <a-icon class="btns-icon" type="rollback" />
                                <div class="btns-text">撤回</div>
                            </div>
                        </a-col>
                        <a-col :class="tabKey!=2?'btns-disable':''" :xs="btnGrid.xs" :sm="btnGrid.sm" :md="btnGrid.md" :lg="btnGrid.lg" :xl="btnGrid.xl">
                            <div class="btns" @click="tabKey==2?approval(2):''">
                                <a-icon class="btns-icon" type="audit" />
                                <div class="btns-text">驳回</div>
                            </div>
                        </a-col>
                        <a-col :class="tabKey!=2?'btns-disable':''" :xs="btnGrid.xs" :sm="btnGrid.sm" :md="btnGrid.md" :lg="btnGrid.lg" :xl="btnGrid.xl">
                            <div class="btns" @click="tabKey==2?archiveHandler():''">
                                <a-icon class="btns-icon" type="audit" />
                                <div class="btns-text">存档</div>
                            </div>
                        </a-col>
                        <!-- <a-col :class="tabKey==1?'btns-disable':''" :xs="btnGrid.xs" :sm="btnGrid.sm" :md="btnGrid.md" :lg="btnGrid.lg" :xl="btnGrid.xl">
                            <div class="btns" @click="tabKey!=1?showEvaluate():''">
                                <a-icon class="btns-icon" type="file-search" />
                                <div class="btns-text">评价</div>
                            </div>
                        </a-col> -->
                    </a-col>
                </a-row>
            </div>
            <a-tabs style="height: 100%;" @change="tabChange">
                <a-tab-pane key="1" tab="我的计划">
                    <!-- <nly-row class="col-12">
                        <nly-col xs="12" sm="12" md="12" lg="12" xl="12" class="form-inline" style="justify-content: left;margin-left: -50px;">
                            <form-input-number title="年份" id="title" labelStyle rightStyle="width:150px;" class="ml-2 mb-2" v-model="postData.year" />
                            <form-select title="月份" class="ml-2 mb-2" rightStyle="width:150px;" v-model="postData.month" addDefaultText="全部" :dataList="dateType" />
                            <form-select title="类型" class="ml-2 mb-2" rightStyle="width:150px;" v-model="postData.type" addDefaultText="全部" :dataList="summaryType" />
                            <div style="margin-left:50px;margin-top:-5px;">
                                <nly-button @click="showFunction" variant="info" button-class="mr-2">
                                    <i :class="show ? 'fas fa-angle-down mr-1' : 'fas fa-angle-up mr-1'" />{{ show ? "折 叠" : "展 开" }}
                                </nly-button>
                                <nly-button variant="info" @click="PageList(null)" button-class="mr-2" style="margin-left: 35px;">查询</nly-button>
                            </div>
                        </nly-col>
                    </nly-row>
                    <nly-row class="col-12" v-show="show">
                        <nly-col xs="12" sm="12" md="12" lg="12" xl="12" class="form-inline" style="justify-content: left;margin-left: -50px;">
                            <form-input title="标题" id="title" labelStyle rightStyle="width:150px;" class="ml-2 mb-2" v-model="postData.title" />
                            <form-select title="状态" class="ml-2 mb-2" rightStyle="width:150px;" v-model="postData.status" addDefaultText="全部" :dataList="[{ key: 0, title: '未报' }, { key: 1, title: '已报' }, { key: 2, title: '迟报' }]" />
                        </nly-col>
                    </nly-row>
                    <div style="margin-top: 20px">
                        <a-button type="primary" class="crm-btn" @click="AddItem">新增</a-button>
                        <a-button type="primary" class="crm-btn" @click="deleteForm">删除</a-button>
                    </div> -->
                    <!-- 我的计划 列表 -->
                    <a-table style="min-height:250px" :columns="columns" :components="components" :data-source="data" :scroll="{ x: 500, y: 500}" :style="tableStyle" bordered :pagination="pagination" @change="onTableChange" :row-selection="{selectedRowKeys: selectedKeys, onChange: selection}">
                        <div slot="filterDropdown" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-input v-ant-ref="c => (searchInput = c)" :placeholder="`搜索${column.title}`" v-model="postData[column.dataIndex]" style="width: 188px; margin-bottom: 8px; display: block;" @change="e => setSelectedKeys(e.target.value ? [e.target.value] : [])" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)" />
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,column.dataIndex)">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                搜索
                            </a-button>
                        </div>
                        <!--类型-->
                        <div slot="filterDropdownType" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-select default-value="" v-model="postData[column.dataIndex]" style="width: 188px; margin-bottom: 8px; display: block;" @change="(e) => {setSelectedKeys(e ? [e] : [])}" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                <a-select-option value=''>
                                    全部
                                </a-select-option>
                                <a-select-option v-for="item in formType" :key="item.key" :value="''+ item.key +''">
                                    {{item.title}}
                                </a-select-option>
                            </a-select>
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,column.dataIndex)">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                搜索
                            </a-button>
                        </div>
                        <!--年月-->
                        <div slot="filterDropdownYear" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-input v-ant-ref="c => (searchInput = c)" :placeholder="`搜索年份`" v-model="postData['year']" style="width: 188px; margin-bottom: 8px; display: block;" @change="e => setSelectedKeys(e.target.value ? [e.target.value] : [])" />
                            <a-select default-value="" v-model="postData['month']" style="width: 188px; margin-bottom: 8px; display: block;" @change="(e) => {setSelectedKeys(e ? [e] : [])}">
                                <a-select-option value=''>
                                    全部
                                </a-select-option>
                                <a-select-option v-for="item in dateType" :key="item.key" :value="''+ item.key +''">
                                    {{item.title}}
                                </a-select-option>
                            </a-select>
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,['year','month'])">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, ['year','month'])">
                                搜索
                            </a-button>
                        </div>
                        <!--状态-->
                        <div slot="filterDropdownStatus" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-select default-value="" v-model="postData[column.title]" style="width: 188px; margin-bottom: 8px; display: block;" @change="(e) => {setSelectedKeys(e ? [e] : [])}" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                <a-select-option value=''>
                                    全部
                                </a-select-option>
                                <a-select-option v-for="item in [{ key: 0, title: '未报' },{ key: 1, title: '已报' },{ key: 2, title: '迟报' }]" :key="item.key" :value="''+ item.key +''">
                                    {{item.title}}
                                </a-select-option>
                            </a-select>
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,column.dataIndex)">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                搜索
                            </a-button>
                        </div>
                        <!--报送人-->
                        <div slot="filterDropdownPeople" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-input v-ant-ref="c => (searchInput = c)" :placeholder="`搜索${column.title}`" v-model="postData.submitName" style="width: 188px; margin-bottom: 8px; display: block;" @change="e => setSelectedKeys(e.target.value ? [e.target.value] : [])" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)" />
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,'submitName')">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, 'submitName')">
                                搜索
                            </a-button>

                        </div>
                        <!--抄送人-->
                        <div slot="filterDropdownCcName" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-input v-ant-ref="c => (searchInput = c)" :placeholder="`搜索${column.title}`" v-model="postData.ccName" style="width: 188px; margin-bottom: 8px; display: block;" @change="e => setSelectedKeys(e.target.value ? [e.target.value] : [])" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)" />
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,'ccName')">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, 'ccName')">
                                搜索
                            </a-button>
                        </div>
                    </a-table>
                </a-tab-pane>
                <a-tab-pane key="2" tab="汇报给我的">
                    <!-- <nly-row class="col-12">
                        <nly-col xs="12" sm="12" md="12" lg="12" xl="12" class="form-inline" style="justify-content: left;margin-left: -50px;">
                            <form-input-number title="年份" id="title" labelStyle rightStyle="width:150px;" class="ml-2 mb-2" v-model="postData.year" />
                            <form-select title="月份" class="ml-2 mb-2" rightStyle="width:150px;" v-model="postData.month" addDefaultText="全部" :dataList="dateType" />
                            <form-select title="类型" class="ml-2 mb-2" rightStyle="width:150px;" v-model="postData.type" addDefaultText="全部" :dataList="summaryType" />
                            <div style="margin-left:50px;margin-top:-5px;">
                                <nly-button @click="showFunction" variant="info" button-class="mr-2">
                                    <i :class="show ? 'fas fa-angle-down mr-1' : 'fas fa-angle-up mr-1'" />{{ show ? "折 叠" : "展 开" }}
                                </nly-button>
                                <nly-button variant="info" @click="PageList(null)" button-class="mr-2" style="margin-left: 35px;">查询</nly-button>
                            </div>
                        </nly-col>
                    </nly-row>
                    <nly-row class="col-12" v-show="show">
                        <nly-col xs="12" sm="12" md="12" lg="12" xl="12" class="form-inline" style="justify-content: left;margin-left: -50px;">
                            <form-input title="标题" id="title" labelStyle rightStyle="width:150px;" class="ml-2 mb-2" v-model="postData.title" />
                            <input-group-search title="部门" class="mb-2" rightStyle="width: 150px;" treeType="office" v-model="postData.officeId" />
                            <div><span style="margin-left: 55px;margin-right: 5px;">抄/报人:</span>
                                <a-input-search placeholder="全部" style="width: 150px" v-model="postData.createUserNames" read-only @click="() => (ccUserVisible=true)" @search="() => (ccUserVisible = true)" />
                            </div>
                            <form-select title="状态" class="ml-2 mb-2" rightStyle="width:150px;" v-model="postData.readStatus" addDefaultText="全部" :dataList="[ { key: 0, title: '未评价' }, { key: 1, title: '已评价' }]" />
                        </nly-col>
                    </nly-row>
                    <div style="margin-top: 20px">
                    </div> -->
                    <!-- 报送给我的 列表 -->
                    <a-table style="min-height:250px" :columns="columns" :components="components" :data-source="data" :scroll="{ x: 500, y: 500}" :style="tableStyle" bordered :pagination="pagination" @change="onTableChange" :row-selection="{selectedRowKeys: selectedKeys, onChange: selection}">
                        <div slot="filterDropdown" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-input v-ant-ref="c => (searchInput = c)" :placeholder="`搜索${column.title}`" v-model="postData[column.dataIndex]" style="width: 188px; margin-bottom: 8px; display: block;" @change="e => setSelectedKeys(e.target.value ? [e.target.value] : [])" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)" />
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,column.dataIndex)">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                搜索
                            </a-button>
                        </div>
                        <!--类型-->
                        <div slot="filterDropdownType" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-select default-value="" v-model="postData[column.title]" style="width: 188px; margin-bottom: 8px; display: block;" @change="(e) => {setSelectedKeys(e ? [e] : [])}" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                <a-select-option value=''>
                                    全部
                                </a-select-option>
                                <a-select-option v-for="item in formType" :key="item.key" :value="''+ item.key +''">
                                    {{item.title}}
                                </a-select-option>
                            </a-select>
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,column.dataIndex)">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                搜索
                            </a-button>
                        </div>
                        <!--年月-->
                        <div slot="filterDropdownYear" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-input v-ant-ref="c => (searchInput = c)" :placeholder="`搜索年份`" v-model="postData['year']" style="width: 188px; margin-bottom: 8px; display: block;" @change="e => setSelectedKeys(e.target.value ? [e.target.value] : [])" />
                            <a-select default-value="" v-model="postData['month']" style="width: 188px; margin-bottom: 8px; display: block;" @change="(e) => {setSelectedKeys(e ? [e] : [])}">
                                <a-select-option value=''>
                                    全部
                                </a-select-option>
                                <a-select-option v-for="item in dateType" :key="item.key" :value="''+ item.key +''">
                                    {{item.title}}
                                </a-select-option>
                            </a-select>
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,['year','month'])">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, ['year','month'])">
                                搜索
                            </a-button>
                        </div>
                        <!--状态-->
                        <div slot="filterDropdownStatus" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-select default-value="" v-model="postData[column.title]" style="width: 188px; margin-bottom: 8px; display: block;" @change="(e) => {setSelectedKeys(e ? [e] : [])}" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                <a-select-option value=''>
                                    全部
                                </a-select-option>
                                <a-select-option v-for="item in [{ key: true, title: '已存档' },{ key: false, title: '未存档' }]" :key="item.key" :value="''+ item.key +''">
                                    {{item.title}}
                                </a-select-option>
                            </a-select>
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,column.dataIndex)">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                搜索
                            </a-button>
                        </div>
                        <!--报送人-->
                        <div slot="filterDropdownPeople" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-input v-ant-ref="c => (searchInput = c)" :placeholder="`搜索${column.title}`" v-model="postData.submitName" style="width: 188px; margin-bottom: 8px; display: block;" @change="e => setSelectedKeys(e.target.value ? [e.target.value] : [])" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)" />
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,'submitName')">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, 'submitName')">
                                搜索
                            </a-button>
                        </div>
                        <!--抄送人-->
                        <div slot="filterDropdownCcName" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-input v-ant-ref="c => (searchInput = c)" :placeholder="`搜索${column.title}`" v-model="postData.ccName" style="width: 188px; margin-bottom: 8px; display: block;" @change="e => setSelectedKeys(e.target.value ? [e.target.value] : [])" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)" />
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,'ccName')">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, 'ccName')">
                                搜索
                            </a-button>
                        </div>
                    </a-table>
                </a-tab-pane>
                <a-tab-pane key="3" tab="抄送给我的">
                    <!-- <nly-row class="col-12">
                        <nly-col xs="12" sm="12" md="12" lg="12" xl="12" class="form-inline" style="justify-content: left;margin-left: -50px;">
                            <form-input-number title="年份" id="title" labelStyle rightStyle="width:150px;" class="ml-2 mb-2" v-model="postData.year" />
                            <form-select title="月份" class="ml-2 mb-2" rightStyle="width:150px;" v-model="postData.month" addDefaultText="全部" :dataList="dateType" />
                            <form-select title="类型" class="ml-2" rightStyle="width:150px;" v-model="postData.type" addDefaultText="全部" :dataList="summaryType" />
                            <div style="margin-left:50px;margin-top:-5px;">
                                <nly-button @click="showFunction" variant="info" button-class="mr-2">
                                    <i :class="show ? 'fas fa-angle-down mr-1' : 'fas fa-angle-up mr-1'" />{{ show ? "折 叠" : "展 开" }}
                                </nly-button>
                                <nly-button variant="info" @click="PageList(null)" button-class="mr-2" style="margin-left: 35px;">查询</nly-button>
                            </div>
                        </nly-col>
                    </nly-row>
                    <nly-row class="col-12" v-show="show">
                        <nly-col xs="12" sm="12" md="12" lg="12" xl="12" class="form-inline" style="justify-content: left;margin-left: -50px;">
                            <form-input title="标题" id="title" labelStyle rightStyle="width:150px;" class="ml-2 mb-2" v-model="postData.title" />
                            <input-group-search title="部门" class="mb-2" rightStyle="width: 150px;" treeType="office" v-model="postData.officeId" />
                            <div><span style="margin-left: 55px;margin-right: 5px;">抄/报人:</span>
                                <a-input-search placeholder="全部" style="width: 150px" v-model="postData.createUserNames" read-only @click="() => (ccUserVisible=true)" @search="() => (ccUserVisible = true)" />
                            </div>
                            <form-select title="状态" class="ml-2 mb-2" rightStyle="width:150px;" v-model="postData.readStatus" addDefaultText="全部" :dataList="[ { key: 0, title: '未评价' }, { key: 1, title: '已评价' }]" />
                        </nly-col>
                    </nly-row>
                    <div style="margin-top: 20px">
                    </div> -->
                    <!-- 抄送给我的 列表 -->
                    <a-table style="min-height:250px" :columns="columns" :components="components" :data-source="data" :scroll="{ x: 500, y: 500}" :style="tableStyle" bordered :pagination="pagination" @change="onTableChange" :row-selection="{selectedRowKeys: selectedKeys, onChange: selection}">
                        <div slot="filterDropdown" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-input v-ant-ref="c => (searchInput = c)" :placeholder="`搜索${column.title}`" v-model="postData[column.dataIndex]" style="width: 188px; margin-bottom: 8px; display: block;" @change="e => setSelectedKeys(e.target.value ? [e.target.value] : [])" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)" />
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,column.dataIndex)">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                搜索
                            </a-button>
                        </div>
                        <!--类型-->
                        <div slot="filterDropdownType" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-select default-value="" v-model="postData[column.title]" style="width: 188px; margin-bottom: 8px; display: block;" @change="(e) => {setSelectedKeys(e ? [e] : [])}" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                <a-select-option value=''>
                                    全部
                                </a-select-option>
                                <a-select-option v-for="item in formType" :key="item.key" :value="''+ item.key +''">
                                    {{item.title}}
                                </a-select-option>
                            </a-select>
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,column.dataIndex)">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, column.dataIndex)">
                                搜索
                            </a-button>
                        </div>
                        <!--年月-->
                        <div slot="filterDropdownYear" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-input v-ant-ref="c => (searchInput = c)" :placeholder="`搜索年份`" v-model="postData['year']" style="width: 188px; margin-bottom: 8px; display: block;" @change="e => setSelectedKeys(e.target.value ? [e.target.value] : [])" />
                            <a-select default-value="" v-model="postData['month']" style="width: 188px; margin-bottom: 8px; display: block;" @change="(e) => {setSelectedKeys(e ? [e] : [])}">
                                <a-select-option value=''>
                                    全部
                                </a-select-option>
                                <a-select-option v-for="item in dateType" :key="item.key" :value="''+ item.key +''">
                                    {{item.title}}
                                </a-select-option>
                            </a-select>
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,['year','month'])">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, ['year','month'])">
                                搜索
                            </a-button>
                        </div>
                        <!--状态-->
                        <div slot="filterDropdownStatus" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-select default-value="" v-model="postData['readStatus']" style="width: 188px; margin-bottom: 8px; display: block;" @change="(e) => {setSelectedKeys(e ? [e] : [])}" @pressEnter="() => handleSearch(selectedKeys, confirm, 'readStatus')">
                                <a-select-option value=''>
                                    全部
                                </a-select-option>
                                <a-select-option v-for="item in [{ key: true, title: '已存档' },{ key: false, title: '未存档' }]" :key="item.key" :value="''+ item.key +''">
                                    {{item.title}}
                                </a-select-option>
                            </a-select>
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,'readStatus')">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, 'readStatus')">
                                搜索
                            </a-button>
                        </div>
                        <!--报送人-->
                        <div slot="filterDropdownPeople" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-input v-ant-ref="c => (searchInput = c)" :placeholder="`搜索${column.title}`" v-model="postData.submitName" style="width: 188px; margin-bottom: 8px; display: block;" @change="e => setSelectedKeys(e.target.value ? [e.target.value] : [])" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)" />
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,'submitName')">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, 'submitName')">
                                搜索
                            </a-button>

                        </div>
                        <!--抄送人-->
                        <div slot="filterDropdownCcName" slot-scope="{ setSelectedKeys, selectedKeys, confirm, clearFilters, column }" style="padding: 8px">
                            <a-input v-ant-ref="c => (searchInput = c)" :placeholder="`搜索${column.title}`" v-model="postData.ccName" style="width: 188px; margin-bottom: 8px; display: block;" @change="e => setSelectedKeys(e.target.value ? [e.target.value] : [])" @pressEnter="() => handleSearch(selectedKeys, confirm, column.dataIndex)" />
                            <a-button size="small" style="width: 90px;margin-right:8px;" @click="() => handleResetSearch(clearFilters,'ccName')">
                                重置
                            </a-button>
                            <a-button type="primary" icon="search" size="small" style="width: 90px;" @click="() => handleSearch(selectedKeys, confirm, 'ccName')">
                                搜索
                            </a-button>

                        </div>
                    </a-table>
                </a-tab-pane>
            </a-tabs>
            <!-- modal 弹窗  -->
            <drag-modal v-model="eidtModelShow" centered class="edit-modal-class" :title="editItem.id ? editItem.createUserName + '的工作计划': '新增工作计划'" @cancel="() => (eidtModelShow = false)" width="1000px">
                <div id="components-form-demo-advanced-search">
                    <a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
                        <a-row :gutter="24">
                            <a-col :span="12">
                                <a-form-item label="标题">
                                    <a-input style="width:717px" autocomplete="off" v-decorator="['title', { rules: [{ required: true, message: '标题不能为空' }] }]" placeholder="2022年2月（第二周）工作计划" :read-only="isReadOnly" />
                                </a-form-item>
                            </a-col>
                        </a-row>
                        <a-row :gutter="24">
                            <a-col :span="12">
                                <a-form-item label="类型">
                                    <a-select :disabled="isReadOnly" v-decorator="['type', { rules: [{ required: true, message: '请选择类型' }] }]" placeholder="请选择类型" @change="handleChange">
                                        <a-select-option value="2">周</a-select-option>
                                        <a-select-option value="3">月</a-select-option>
                                        <a-select-option value="1">季</a-select-option>
                                        <a-select-option value="4">年</a-select-option>
                                        <a-select-option value="5">自定义</a-select-option>
                                    </a-select>
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item label="起止日期">
                                    <a-range-picker :disabled="typeCheck != 5" :showTime="true" format="YYYY-MM-DD" @change="dateChange" style="width: 228px" v-decorator="['formDate', { rules: [{ required: false, message: '请选择时间' }] }]" />　
                                </a-form-item>
                            </a-col>
                        </a-row>
                        <!-- <a-row :gutter="24">
                            <a-col :span="12">
                                <a-form-item label="报送截止日">
                                    <span>{{deadlineText}}</span>
                                </a-form-item>
                            </a-col>
                        </a-row> -->
                        <a-row :gutter="24">
                            <a-col :span="24" class="fill-in-class">
                                <div class="edit-box" style="padding: 10px;">
                                    <!-- <ueditor v-show="tabKey == 1" :content.sync="content"></ueditor> -->
                                    <a-textarea style="min-height:200px" v-show="tabKey == 1" v-model="content"></a-textarea>
                                    <div v-show="tabKey != 1" v-html="content" class="show-content-style"></div>
                                </div>
                            </a-col>
                        </a-row>
                        <!-- <div class="evaluate-title">
                            评价信息:
                        </div>
                        <div class="evaluate-work-box">
                            <a-row>
                                <a-col span="2" class="my-box-title">
                                    <div style="width:13px;margin:0 auto;margin-top:30px;">主管评价</div>
                                </a-col>
                                <a-col span="22">
                                    <a-textarea v-if="tabKey == 2" v-model="evaluationContent" placeholder="请输入评价" style="resize: none;height:112px;border:none;">

                                    </a-textarea>
                                    <div v-else style="height:112px;border:none;padding:5px 0 0 5px;">
                                        {{editItem.evaluationContent}}
                                    </div>
                                    <div style="display:flex;">
                                        <div style="flex:0 0 400px;padding-left:10px;">
                                            <div style="float:left;line-height:32px;">评价等级:</div>
                                            <div style="float:left" v-if="tabKey == 2">
                                                <a-select style="width:100px;margin-left:10px;" v-model="evaluationLevel" placeholder="请选择等级">
                                                    <a-select-option value="A">A</a-select-option>
                                                    <a-select-option value="B">B</a-select-option>
                                                    <a-select-option value="C">C</a-select-option>
                                                    <a-select-option value="D">D</a-select-option>
                                                </a-select>
                                            </div>
                                            <div style="float:left;line-height:32px;" v-else>
                                                {{editItem.evaluationLevel}}
                                            </div>
                                        </div>
                                        <div style="flex:1;line-height:32px;">
                                            评价人：{{editItem.submitName}}
                                        </div>
                                        <div style="flex:1;line-height:32px;">
                                            评价日期：{{editItem.evaluationDate}}
                                        </div>
                                    </div>
                                </a-col>
                            </a-row>
                        </div> -->

                        <!-- <a-textarea placeholder="请输入内容" :read-only="isReadOnly" :rows="5" v-model="nextContent" /> -->
                        <!-- <a-row :gutter="24">
                            <a-col :span="12">
                                <a-form-item label="报送">
                                    <input-group-search modalTitle="请选择报送人" rightStyle="width: 250px;margin-top: -45px;" treeType="officeUser" :valueTitle.sync="submitUserName" v-model="submitUserId" />
                                </a-form-item>
                            </a-col>
                            <a-col :span="12">
                                <a-form-item label="抄送">
                                    <a-input-search v-model="ccUserNames" read-only @click="() => (ccUserVisible=true)" @search="() => (ccUserVisible = true)" />
                                </a-form-item>
                            </a-col>
                        </a-row> -->
                        <!-- <a-row :gutter="24">
                            <a-col :span="12">
                                <a-form-item label="关联业务">
                                    <a-textarea placeholder="请输入关联业务" v-model="associatedBusiness" />
                                </a-form-item>
                            </a-col>
                        </a-row> -->
                        <a-row :gutter="24">
                            <a-col :span="12">
                                <a-form-item label="附件">
                                    <div ref="uploadRef" id="uploadRef">
                                        <a-upload :action="this.$Global.ApiBaseUrl + '/uploadFile'" list-type="picture" :fileList="fileList" :headers="header" @change="uploadFile">
                                            <a-button v-if="tabKey == 1">
                                                <a-icon type="upload" />点击上传
                                            </a-button>
                                        </a-upload>
                                    </div>
                                </a-form-item>
                            </a-col>
                        </a-row>
                        <!-- <a-row :gutter="24" v-if="isEvaluation">
                            <a-col :span="12">
                                <a-form-item label="评价等级">
                                    <a-select v-decorator="['evaluationLevel', { rules: [{ required: false, message: '请选择等级' }] }]" placeholder="请选择类型">
                                        <a-select-option value="A">A</a-select-option>
                                        <a-select-option value="B">B</a-select-option>
                                        <a-select-option value="C">C</a-select-option>
                                        <a-select-option value="D">D</a-select-option>
                                    </a-select>
                                </a-form-item>
                            </a-col>
                        </a-row>
                        <a-row :gutter="24" v-if="isEvaluation">
                            <a-col :span="12">
                                <a-form-item label="评价内容">
                                    <a-textarea placeholder="请输入评价内容" :rows="3" v-decorator="['evaluationContent', { rules: [{ required: false, message: '请输入评价内容' }] }]" />
                                </a-form-item>
                            </a-col>
                        </a-row> -->
                    </a-form>
                </div>
                <template slot="footer">
                    <!-- <a-button v-show="isEvaluationBtnShow" type="primary" @click="saveEvaluation">保存评价</a-button> -->
                    <!-- <a-button v-show="isSaveBtnShow" type="primary" html-type="submit" @click="handleSubmit(1)">提交</a-button> -->
                    <a-button v-show="isSaveBtnShow" type="primary" html-type="submit" @click="handleSubmit(0)">保存</a-button>
                    <!-- <a-button :style="{ marginLeft: '8px' }" @click="handleReset">重置</a-button> -->
                    <a-button :style="{ marginLeft: '8px' }" @click="() => (eidtModelShow = false)">关闭</a-button>
                </template>
            </drag-modal>

            <!--报送、抄送 弹窗-->
            <a-modal v-model="submitVisible" title="汇报/抄送" centered on-ok="handleok" width="500px">
                <a-form class="ant-advanced-search-form" :label-col="{ span: 6 }" :wrapper-col="{ span: 14 }" :form="form">
                    <a-row :gutter="24">
                        <a-col :span="24">
                            <a-form-item label="汇报给">
                                <input-group-search modalTitle="请选择汇报人" rightStyle="margin-top: -45px;" treeType="officeUser" :valueTitle.sync="submitUserName" v-model="submitUserId" />
                            </a-form-item>
                        </a-col>
                    </a-row>
                    <a-row :gutter="24">
                        <a-col :span="24">
                            <a-form-item label="抄送给">
                                <a-input-search v-model="ccUserNames" read-only @click="() => (ccUserVisible=true)" @search="() => (ccUserVisible = true)" />
                            </a-form-item>
                        </a-col>
                    </a-row>
                </a-form>
                <template slot="footer">
                    <a-button type="primary" html-type="submit" @click="submitReportForm">汇报</a-button>
                    <!-- <a-button :style="{ marginLeft: '8px' }" @click="handleReset">重置</a-button> -->
                    <a-button :style="{ marginLeft: '8px' }" @click="() => (submitVisible = false)">关闭</a-button>
                </template>
            </a-modal>

            <a-modal v-model="ccUserVisible" title="抄送人选择" centered on-ok="handleok" width="300px">
                <div style="height: 400px;overflow-y:scroll;">
                    <a-input-search style="margin-bottom: 8px" placeholder="输入用户名称" @change="onChange" />
                    <div v-show="treeAShow">
                        <a-tree v-model="checkedUserKeys" :tree-data="userSearchData" :show-icon="true" :expanded-keys="expandedUserKeys" @expand="expanedChange" :defaultExpandAll="true" checkable @check="userCheck">
                            <a-icon slot="user" type="user" />
                        </a-tree>
                    </div>
                    <div v-show="treeBShow">
                        <a-tree v-model="checkedUserKeys" :tree-data="userAllData" :show-icon="true" checkable :defaultExpandAll="true" @check="userCheck">
                            <a-icon slot="user" type="user" />
                        </a-tree>
                    </div>
                </div>
                <template slot="footer">
                    <a-button key="submit" type="primary" @click="() => (ccUserVisible = false)">确定</a-button>
                    <a-button key="back" @click="() => (ccUserVisible = false)">关闭</a-button>
                </template>
            </a-modal>
            <a-modal v-model="evaluationVisible" title="评价" centered on-ok="handleok" width="500px">
                <a-form class="ant-advanced-search-form" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }" :form="form" @submit="saveEvaluation">
                    <a-row :gutter="24">
                        <a-col :span="24">
                            <a-form-item label="评价等级">
                                <a-select v-decorator="['evaluationLevel', { rules: [{ required: false, message: '请选择等级' }] }]" placeholder="请选择类型">
                                    <a-select-option value="A">A</a-select-option>
                                    <a-select-option value="B">B</a-select-option>
                                    <a-select-option value="C">C</a-select-option>
                                    <a-select-option value="D">D</a-select-option>
                                </a-select>
                            </a-form-item>
                        </a-col>
                    </a-row>
                    <a-row :gutter="24">
                        <a-col :span="24">
                            <a-form-item label="评价内容">
                                <a-textarea placeholder="请输入评价内容" :rows="3" v-decorator="['evaluationContent', { rules: [{ required: false, message: '请输入评价内容' }] }]" />
                            </a-form-item>
                        </a-col>
                    </a-row>
                </a-form>
                <template slot="footer">
                    <a-button type="primary" html-type="submit" @click="saveEvaluation">保存</a-button>
                    <a-button :style="{ marginLeft: '8px' }" @click="() => (evaluationVisible = false)">关闭</a-button>
                </template>
            </a-modal>
            <!-- 设置 -->
            <a-modal v-model="setVisible" title="报送设置" centered on-ok="handleok" width="900px">
                <!-- 报送设置 -->
                <a-table :columns="setColumns" :data-source="setData" bordered :pagination="false">
                    <template slot="submit" slot-scope="text, record, index">
                        <input-group-search labelStyle="display:none" rightStyle="width: 170px;" treeType="officeUser" :valueTitle.sync="setData[index].submitName" v-model="setData[index].submitId" />
                    </template>
                    <template slot="cc" slot-scope="text, record, index">
                        <a-input-search v-model="setData[index].ccName" read-only @click="selectCC(index)" @search="selectCC(index)" />
                    </template>
                    <template slot="deadline" slot-scope="text, record, index">
                        <a-cascader :options="options[index]" v-model="setData[index].deadline" @change="deadlineChange" placeholder="请选择截止时间" />
                    </template>
                    <template slot="isOvertime" slot-scope="text, record, index">
                        <a-radio-group name="isOvertime" v-model="setData[index].isOvertime" :default-value="0">
                            <a-radio :value="0">否</a-radio>
                            <a-radio :value="1">是</a-radio>
                        </a-radio-group>
                    </template>
                </a-table>
                <template slot="footer">
                    <a-button type="primary" html-type="submit" @click="saveReportUser">保存</a-button>
                    <a-button :style="{ marginLeft: '8px' }" @click="() => (setVisible = false)">关闭</a-button>
                </template>
            </a-modal>
        </div>
    </nly-content-wrapper>
</template>

<script>
import { mapState } from "vuex";
import { FormInput, FormSelect } from "@/components/Form";
import { save, pageList, deleteSummary, submitWorkSummary, readWorkSummary, returnPlan, approval, finishApi } from "@/api/work/planSummary";
import { saveReportUser, detail } from "@/api/work/reporUser";
import { listToMap } from "@/utils/tool/map";
import { components } from "@/utils/antTableComponents";
import { TreeDataOffice } from "@/api/office";
import { officeUserListToTree, searchInTreeData } from "@/utils/tree";
import getDate from "@/utils/tool/date";
import ueditor from '@/components/Ueditor/index';


let date = new Date();
let y = date.getFullYear();

const basePostData = {
    current: 1,
    size: 20,
    year: y,
    tabKey: 1
};

export default {
    components: {
        FormInput,
        FormSelect,
        ueditor
    },
    data () {
        const setColumns = [
            {
                title: "类型",
                dataIndex: "type",
                key: "type",
                width: 60,
                customRender: (text, row) => {
                    const type = ["季", "周", "月"];
                    return type[text - 1];
                }
            },
            {
                title: "报送人",
                dataIndex: "submitName",
                key: "submitName",
                width: 80,
                scopedSlots: { customRender: "submit" }
            },
            {
                title: "抄送人",
                dataIndex: "ccName",
                key: "ccName",
                width: 220,
                scopedSlots: { customRender: "cc" }
            },
            {
                title: "报送截止时间",
                dataIndex: "deadline",
                key: "deadline",
                width: 220,
                scopedSlots: { customRender: "deadline" }
            },
            {
                title: "超时报送",
                dataIndex: "isOvertime",
                key: "isOvertime",
                width: 100,
                scopedSlots: { customRender: "isOvertime" }
            }
        ];
        const columns = [
            {
                title: "标题",
                dataIndex: "title",
                key: "title",
                width: 260,
                align: 'left',
                scopedSlots: {
                    filterDropdown: 'filterDropdown',
                    filterIcon: 'filterIcon',
                },
                customRender: (text, row) => {
                    return (
                        <span>
                            <i class={row.title || ""} style="margin-right:5px;"></i>
                            <a href="javascript:;" onClick={() => this.EdiItem(row)}>{text}</a>
                        </span>
                    );
                }
            },
            {
                title: "类型",
                dataIndex: "type",
                key: "type",
                width: 80,
                scopedSlots: {
                    filterDropdown: 'filterDropdownType',
                    filterIcon: 'filterIcon',
                },
                customRender: (text, row) => {
                    const type = ["季", "周", "月", "年", "自定义"];
                    return type[text - 1];
                }
            },
            {
                title: "年月",
                dataIndex: "year",
                key: "year",
                width: 100,
                scopedSlots: {
                    filterDropdown: 'filterDropdownYear',
                    filterIcon: 'filterIcon',
                },
                customRender: (text, row) => {
                    if (row.endDate) {
                        const month = row.endDate.split("-");
                        return text + '年' + month[1] + '月';
                    }
                }
            },
            // {
            //     title: "月份",
            //     dataIndex: "endDate",
            //     key: "endDate",
            //     width: 80,
            //     scopedSlots: {
            //         filterDropdown: 'filterDropdownMoneh',
            //         filterIcon: 'filterIcon',
            //     },
            //     customRender: (text, row) => {
            //         if (row.endDate) {
            //             const month = row.endDate.split("-");
            //             return month[1];
            //         }
            //     }
            // },
            {
                title: "起止日期",
                dataIndex: "createDate",
                key: "createDate",
                width: 200,
                customRender: (text, row) => {
                    if (row.beginDate && row.endDate) {
                        return moment(row.beginDate).format("YYYY-MM-DD") + "至" + moment(row.endDate).format("YYYY-MM-DD");
                    }
                }
            },
            {
                title: "主管评级",
                dataIndex: "evaluationLevel",
                key: "evaluationLevel",
                width: 80
            },
            {
                title: "主评内容",
                dataIndex: "evaluationContent",
                key: "evaluationContent",
                width: 120,
                align: 'left',
                customRender: (text, row) => {
                    return (
                        <a style="color: #000;" href="javascript:;" title={text}>{text}</a>
                    );
                }
            },
            {
                title: "汇报给",
                dataIndex: "submitName",
                key: "submitName",
                width: 120,
                scopedSlots: {
                    filterDropdown: 'filterDropdownPeople',
                    filterIcon: 'filterIcon',
                },
            },
            {
                title: "抄送给",
                dataIndex: "ccName",
                key: "ccName",
                align: 'left',
                width: 120,
                scopedSlots: {
                    filterDropdown: 'filterDropdownCcName',
                    filterIcon: 'filterIcon',
                },
            },
            {
                title: "汇报",
                dataIndex: "createUserName",
                key: "createUserName",
                width: 120
            },
            {
                title: "发送时间",
                dataIndex: "submitDate",
                key: "submitDate",
                width: 120
            },
            {
                title: "状态",
                dataIndex: "status",
                key: "status",
                width: 120,
                scopedSlots: {
                    filterDropdown: 'filterDropdownStatus',
                    filterIcon: 'filterIcon',
                },
                customRender: (text, row) => {
                    if (this.tabKey == 1) {
                        const status = ["未报", "已报", "迟报"];
                        return status[text];
                    } else {
                        return row.finishStatus ? "已存档" : "未存档";
                    }
                }
            },
            // {
            //     title: "操作",
            //     dataIndex: "id",
            //     key: "id",
            //     width: 120,
            //     customRender: (text, row) => {
            //         if (this.tabKey == 2) {
            //             if (!row.evaluationLevel) {
            //                 return (
            //                     <div class="row justify-content-md-center">
            //                         <span class="col-sm-auto col-md-auto col-lg-auto col-xl-auto">
            //                             <a href="javascript:;" title="评价" class="mr-1 col-1" onClick={() => (this.evaluationVisible = true, this.editItem = row)}>评价</a>
            //                         </span>
            //                     </div>
            //                 );
            //             }
            //         } else if (this.tabKey == 1) {
            //             if (row.status == 0) {
            //                 return (
            //                     <div class="row justify-content-md-center">
            //                         <span class="col-sm-auto col-md-auto col-lg-auto col-xl-auto">
            //                             <a href="javascript:;" title="报送" class="mr-1 col-1" onClick={() => this.submitReportForm(row)}>提交</a>
            //                         </span>
            //                     </div>
            //                 );
            //             }
            //         }
            //     }
            // }
        ];

        //表格 头部 可伸缩
        this.components = components(columns);
        return {
            //----------↓样式----------
            btnGrid: {
                xs: 2,
                sm: 2,
                md: 2,
                lg: 2,
                xl: 2
            },
            //----------↑样式----------
            //gw 2021年8月31日08:46:03
            typeCheck: 1,//工作报表类型
            associatedBusiness: null,//关联业务
            myEvaluationLevel: null,//自我评价等级
            myEvaluationContent: null,//自我评价内容
            evaluationContent: null,//主管评价内容
            evaluationLevel: null,//主管评价等级
            //gw 2021年8月31日08:46:12
            tabKey: 1,
            setIndex: -1,
            isReadOnly: false,
            header: { "Access-Token": Vue.ls.get("Access-Token") },
            fileList: [], //文档列表
            postData: { ...basePostData },
            data: [],
            options: [],
            count: 0,
            columns,
            setColumns,
            setData: [],
            show: false,
            tableStyle: "",
            form: this.$form.createForm(this, { name: "advanced_search" }),
            isEvaluation: false, //是否显示评价
            isEvaluationBtnShow: false, //评价按钮
            pagination: { //分页信息
                defaultPageSize: 20,
                current: 1,
                pageSize: 20,
                total: 0,
                showTotal: total => {
                    return (
                        <div>
                            共 {total} 条数据，每页
                            <a-input-number
                                value={this.pagination.pageSize}
                                min={1}
                                max={500}
                                onPressEnter={e => this.changePageSize(e)}
                            />
                            条
                        </div>
                    );
                },
                showQuickJumper: true,
                showLessItems: true
            },
            reporForm: {},
            show: false, //是否显示
            editItem: {}, //新增/编辑对象
            selectedKeys: [],  //table选中key
            userSearchData: [], //用户搜索数据
            userAllData: [], //用户所有tree数据
            treeAShow: false, //搜索用户tree
            treeBShow: true, //用户tree
            expandedUserKeys: [],
            eidtModelShow: false,
            selectedIds: [],  //table选中id
            selectedData: [], //table选中数据
            editor: null,
            dateSting: [], //起止日期
            submitVisible: false, //报送弹窗
            submitUserVisible: false, //报送人弹窗
            ccUserVisible: false, //抄送人弹窗
            evaluationVisible: false, //评价弹窗
            setVisible: false, //设置弹窗
            checkedUserKeys: [], //用户tree keys
            ccUserNames: "", //抄送人姓名
            ccUserIds: "", //抄送人id
            submitUserName: "", //报送人姓名
            submitUserId: "", //报送人id
            isSaveBtnShow: true, //是否显示保存按钮
            allBtnStyle: "background:#1890ff;color:#fff;",
            noBtnStyle: "",
            yesBtnStyle: "",
            nextContent: "", //工作计划
            content: "", //工作内容
            workText: "工作计划", //工作标题
            planText: "下次工作计划", //计划标题
            deadlineText: "", //截止日期
            dateType: [{ key: 1, title: '1月' },
            { key: 2, title: '2月' },
            { key: 3, title: '3月' },
            { key: 4, title: '4月' },
            { key: 5, title: '5月' },
            { key: 6, title: '6月' },
            { key: 7, title: '7月' },
            { key: 8, title: '8月' },
            { key: 9, title: '9月' },
            { key: 10, title: '10月' },
            { key: 11, title: '11月' },
            { key: 12, title: '12月' }],
            formType: [
                { key: 2, title: '周' },
                { key: 3, title: '月' },
                { key: 1, title: '季' },
                { key: 4, title: '年' },
                { key: 5, title: '自定义' }
            ],
            summaryType: [
                { key: 2, title: '周' },
                { key: 3, title: '月' },
                { key: 1, title: '季' },
                { key: 4, title: '年' },
                { key: 5, title: '自定义' }]
        };
    },
    computed: {
        ...mapState({
            userInfo: state => state.user.info,
            permissions: state => state.user.permissions,
        }),
    },
    mounted () {
        this.PageList();
        TreeDataOffice({ isLoadUser: 2 }).then(response => {
            const { data } = response;
            const childrenNav = [];
            officeUserListToTree(data, childrenNav, "0");
            this.userAllData = childrenNav;
            this.userSearchData = childrenNav;
        });
        detail({ workType: 3 }).then(res => {
            if (res.code == 200 && res.data.length > 2) {
                this.setData = res.data;
                this.setData.forEach(item => item.deadline = item.deadline.split(",").map(Number));
                console.log(this.setData);
            }
        });
    },
    methods: {
        handleSearch (selectedKeys, confirm, dataIndex) {
            //搜索
            console.log(selectedKeys, confirm, dataIndex)
            confirm();
            // this.searchText = selectedKeys[0];
            // this.searchedColumn = dataIndex;
            this.postData[dataIndex] = selectedKeys[0];
            console.log(this.postData)
            this.PageList();
        },
        handleResetSearch (clearFilters, code) {
            console.log(clearFilters, code)
            //重置
            clearFilters();
            this.postData[code] = null;
        },
        //tab 切换
        tabChange (key) {
            console.log(key);
            this.tabKey = key;
            this.show = false;
            this.selectedKeys = [];
            this.selectedIds = [];
            this.selectedData = [];
            this.postData = { ...basePostData };
            if (key == 1) {
                this.isSaveBtnShow = true;
                this.isEvaluation = false;
                this.isEvaluationBtnShow = false;
                this.postData.tabKey = 1;
                this.isReadOnly = false;
            } else {
                this.isReadOnly = true;
                if (key == 2) {
                    this.postData.tabKey = 2;
                    this.isEvaluationBtnShow = true;
                } else {
                    this.postData.tabKey = 3;
                    this.isEvaluationBtnShow = false;
                }
                this.isSaveBtnShow = false;
                this.isEvaluation = true;
            }
            this.PageList();
        },
        //type 切换
        typeChange (key) {
            if (key == -1) {
                this.PageList(null);
            } else {
                this.PageList(key);
            }
        },
        //添加
        AddItem () {
            this.editItem = {};
            this.fileList = [];
            this.detailData = [];
            this.eidtModelShow = true;
            this.checkedUserKeys = [];
            this.ccUserIds = "";
            this.ccUserNames = "";
            this.submitUserId = "";
            this.submitUserName = "";
            this.deadlineText = "";
            this.associatedBusiness = '';
            this.evaluationContent = '';//主管评价内容
            this.evaluationLevel = '';//主管评价等级
            this.handleReset();

            //form赋值
            this.form = this.$form.createForm(this, {
                mapPropsToFields: () => {
                    return {
                        content: this.$form.createFormField({
                            value: '11'
                        })
                    };
                }
            });
        },
        //编辑
        EdiItem (row) {

            let data = [];
            if (row && row.id) {
                data = row;
            } else {
                if (this.selectedKeys.length != 1) {
                    this.$message.warning('请选择一条数据');
                    return;
                }
                data = this.selectedData[0];
            }
            // this.selectedIds = [];
            // this.selectedData = [];
            // this.selectedKeys = [];
            // this.selectedData[0] = row;
            // this.selectedIds[0] = row.id;

            this.eidtModelShow = true;
            this.editItem = { ...data };
            this.content = data.content;
            this.nextContent = data.nextContent;
            this.ccUserIds = data.ccId;
            this.ccUserNames = data.ccName;
            this.submitUserId = data.submitId;
            this.submitUserName = data.submitName;
            this.associatedBusiness = data.associatedBusiness;
            this.evaluationContent = data.evaluationContent;;//主管评价内容
            this.evaluationLevel = data.evaluationLevel;;//主管评价等级
            //赋值文档
            if (data.files) {
                this.fileList = [{
                    uid: '1',
                    name: data.files.split("/")[4],
                    status: 'done',
                    url: data.files,
                    thumbUrl: data.files
                }];
            } else {
                this.fileList = [];
            }
            //form赋值
            this.form = this.$form.createForm(this, {
                mapPropsToFields: () => {
                    return {
                        title: this.$form.createFormField({
                            value: data.title
                        }),
                        type: this.$form.createFormField({
                            value: data.type + ""
                        }),
                        formDate: this.$form.createFormField({
                            value: data.beginDate && data.endDate ? [moment(data.beginDate, 'YYYY-MM-DD HH:mm'), moment(data.endDate, 'YYYY-MM-DD HH:mm')] : ""
                        }),
                        // evaluationLevel: this.$form.createFormField({
                        //     value: data.evaluationLevel
                        // }),
                        // evaluationContent: this.$form.createFormField({
                        //     value: data.evaluationContent
                        // }),
                        // content: this.$form.createFormField({
                        //     value: '11'
                        // })
                    };
                }
            });

            const userKeys = data.ccId.split(",");
            this.checkedUserKeys = [];
            userKeys.forEach(item => this.checkedUserKeys.push(item + "_user"));
            if (data.type <= 3) {
                if (this.setData.length > 0 && this.setData[data.type - 1] && this.setData[data.type - 1].deadlineText) {
                    this.deadlineText = this.setData[data.type - 1].deadlineText;
                }
            } else {
                this.deadlineText = "无限制";
            }

            if (this.tabKey != 1) {
                //处理附件的删除按钮
                this.$nextTick(() => {
                    let dom = document.querySelector('.ant-upload-list-item-card-actions');
                    if (dom) {
                        dom.style.display = 'none';
                    }
                })
            }
        },
        //删除计划
        deleteForm () {
            if (this.selectedIds.length < 1) {
                this.$message.warning("请选择要删除的计划");
                return;
            }
            let _this = this;
            this.$confirm({
                title: '提示',
                content: '您确定要删除该计划吗？',
                onOk () {
                    deleteSummary(_this.selectedIds).then(response => {
                        if (response.code == 200) {
                            _this.$message.success("删除成功");
                            _this.PageList();
                        } else {
                            // _this.$message.warning(response.message);
                        }
                    });
                },
                onCancel () {
                },
            });
        },
        // 获取列表
        PageList (status) {
            const { postData } = this;
            postData.workType = 1;//工作计划
            pageList(postData).then(response => {
                if (response.code === 200) {
                    const { data } = response;
                    const { records, total, current, size } = data;
                    records.forEach(item => {
                        item.year = item.endDate.split("-")[0];
                        item.key = item.id;
                    });
                    this.data = records;
                    if (records.length > 0) {
                        this.tableStyle = "height: calc(100vh - 22rem);";
                    } else {
                        this.tableStyle = "";
                    }
                    Object.assign(this.pagination, {
                        total
                    });
                }
            }).catch(error => { });
        },
        //保存评价
        saveEvaluation (e) {
            e.preventDefault();
            this.form.validateFields((err, values) => {
                if (!err) {
                    this.reporForm.evaluationLevel = this.evaluationLevel;
                    this.reporForm.evaluationContent = this.evaluationContent;
                    this.reporForm.id = this.editItem.id;
                    this.reporForm.createDate = null;
                    this.reporForm.submitDate = null;
                    this.reporForm.evaluationDate = null;
                    this.reporForm.myEvaluationDate = null;
                    console.log("保存评价", values);
                    readWorkSummary(this.reporForm).then(response => {
                        if (response.code == 200) {
                            this.$message.success("评价成功");
                            this.PageList();
                            this.evaluationVisible = false;
                            this.eidtModelShow = false;
                            this.selectedKeys = [];
                            this.selectedData = [];
                        } else {
                            this.PageList();
                            // this.$message.warning(response.message);
                        }
                    });
                }
            });
        },
        //设置抄送人
        selectCC (index) {
            this.ccUserVisible = true;
            this.setIndex = index;
            const userKeys = this.setData[index].ccId.split(",");
            this.checkedUserKeys = [];
            userKeys.forEach(item => this.checkedUserKeys.push(item + "_user"));
        },
        //获取
        showFunction () {
            this.show = !this.show;
        },
        //表单重置
        handleReset () {
            this.form.resetFields();
            this.content = "";
            this.nextContent = "";
        },
        //保存并报送计划
        handleSubmit (status) {
            this.form.validateFields((err, values) => {
                if (!err) {
                    if (!this.content) {
                        this.$message.warning("工作计划不能为空");
                        return;
                    }
                    // if (!this.submitUserId || this.submitUserId.length < 1) {
                    //     this.$message.warning("报送人不能为空");
                    //     return;
                    // }
                    if (this.fileList.length > 1) {
                        this.$message.warn("请上传一个文件");
                        return;
                    }

                    const id = this.editItem.id;
                    this.editItem = Object.assign({}, this.editItem, { ...values });
                    this.editItem.id = id;
                    this.editItem.content = this.content;
                    this.editItem.nextContent = this.nextContent;
                    this.editItem.ccId = this.ccUserIds;
                    this.editItem.ccName = this.ccUserNames;
                    this.editItem.submitId = this.submitUserId;
                    this.editItem.submitName = this.submitUserName;
                    this.editItem.associatedBusiness = this.associatedBusiness;
                    this.editItem.evaluationContent = this.evaluationContent;//主管评价内容
                    this.editItem.evaluationLevel = this.evaluationLevel;//主管评价等级
                    if (this.fileList.length > 0) {
                        this.editItem.files = this.fileList[0].url;
                    }
                    this.editItem.beginDate = this.dateSting[0];
                    this.editItem.endDate = this.dateSting[1];
                    this.editItem.status = status;
                    this.editItem.workType = 1;
                    console.log("开始保存:", this.editItem);
                    this.editItem.createDate = null;
                    this.editItem.submitDate = null;
                    this.editItem.evaluationDate = null;
                    this.editItem.myEvaluationDate = null;
                    save(this.editItem).then(response => {
                        if (response.code === 200) {
                            this.$message.success("保存成功");
                            //刷新 列表
                            this.PageList();
                            this.selectedKeys = [];
                            this.selectedData = [];
                            this.eidtModelShow = false;
                        } else {
                            // this.$message.warning(response.message);
                        }
                    })

                }
            });
        },
        //展示评价弹窗
        showEvaluate () {
            if (this.selectedKeys.length != 1) {
                this.$message.warning('请选择一条数据');
                return;
            }
            this.evaluationVisible = true;
            this.editItem = this.selectedData[0];
        },
        //展示报送、抄送人弹窗
        showSubmitPeople () {
            if (this.selectedKeys.length != 1) {
                this.$message.warning('请选择一条数据');
                return;
            }
            this.submitVisible = true;
            this.ccUserNames = '';
            this.ccUserIds = '';
            this.checkedUserKeys = []
        },
        //报送计划
        submitReportForm () {
            let data = this.selectedData[0];
            data.submitName = this.submitUserName;
            data.submitId = this.submitUserId;
            data.ccName = this.ccUserNames;
            data.ccId = this.ccUserIds;
            let _this = this;
            this.$confirm({
                title: '提示',
                content: '您确定要提交该计划吗？',
                onOk () {
                    if (!data.submitId) {
                        _this.$message.warning("报送人不能为空");
                        return;
                    }

                    data.createDate = null;
                    data.submitDate = null;
                    data.evaluationDate = null;
                    data.myEvaluationDate = null;
                    submitWorkSummary(data).then(response => {
                        if (response.code == 200) {
                            _this.$message.success("报送成功");
                            _this.submitVisible = false;//关闭报送弹窗
                            _this.selectedKeys = [];
                            _this.selectedData = [];
                            _this.PageList();
                        } else {
                            _this.PageList();
                            // _this.$message.warning(response.message);
                        }
                    });
                },
                onCancel () {
                },
            });
        },
        //设置报送人
        SetReportUser () {
            this.setVisible = true;
            detail().then(res => {
                if (res.code == 200 && res.data.length > 2) {
                    this.setData = res.data;
                    this.setData.forEach(item => item.deadline = item.deadline.split(",").map(Number));
                    console.log(this.setData);
                } else {
                    this.setData = [
                        {
                            type: 1,
                            ccId: "",
                            ccName: "",
                            submitId: "",
                            submitName: "",
                            deadline: [],
                            isOvertime: 0,
                            userKeys: []
                        },
                        {
                            type: 2,
                            ccId: "",
                            ccName: "",
                            submitId: "",
                            submitName: "",
                            deadline: [],
                            isOvertime: 0,
                            userKeys: []
                        },
                        {
                            type: 3,
                            ccId: "",
                            ccName: "",
                            submitId: "",
                            submitName: "",
                            deadline: [],
                            isOvertime: 0,
                            userKeys: []
                        },
                    ];
                }
            });
        },
        //保存计划设置
        saveReportUser () {
            let data = [...this.setData];
            data.forEach(item => item.deadline = item.deadline.toString());
            saveReportUser(data).then(res => {
                if (res.code == 200) {
                    this.setVisible = false;
                    this.$message.success("保存成功");
                } else {
                    // this.$message.warning(response.message);
                }
            });
        },
        //计划table选择
        selection (keys, info) {
            this.selectedKeys = keys;
            const ids = new Array();
            info.forEach(function (val) {
                ids.push(val.id);
            });
            this.selectedIds = ids;
            this.selectedData = info;
        },
        //用户tree选择
        userCheck (keys, info) {
            console.log(this.checkedUserKeys);
            this.ccUserNames = "";
            this.ccUserIds = "";
            if (info.checkedNodes.length > 0) {
                for (let i = 0; i < info.checkedNodes.length; i++) {
                    const id = info.checkedNodes[i].data.props.id;
                    const name = info.checkedNodes[i].data.props.name;
                    if (id.indexOf("user") != -1) {
                        this.ccUserNames += name + ",";
                        this.ccUserIds += id.split("_")[0] + ",";
                    }
                }
                this.ccUserNames = this.ccUserNames.slice(0, this.ccUserNames.length - 1);
                this.ccUserIds = this.ccUserIds.slice(0, this.ccUserIds.length - 1);
                if (this.setIndex != -1) {
                    this.setData[this.setIndex].ccId = this.ccUserIds;
                    this.setData[this.setIndex].ccName = this.ccUserNames;
                    this.setData[this.setIndex].userKeys = keys;
                }
            }
            if (this.tabKey != 1) {
                this.postData.createUserNames = this.ccUserNames;
                this.postData.createUserIds = this.ccUserIds;
            }
        },
        deadlineChange (value, selectedOptions) {
            console.log(value, selectedOptions.map(o => o.label).join(' '))
            const text = selectedOptions.map(o => o.label).join(' ');
            if (text.indexOf("日") != -1) {
                this.setData[0].deadlineText = text;
            } else if (text.indexOf("周") != -1) {
                this.setData[1].deadlineText = text;
            } else {
                this.setData[2].deadlineText = text;
            }
        },
        displayRender ({ labels }) {
            return labels[labels.length - 1];
        },
        handleChange (value) {
            this.typeCheck = value;//类型选择的值
            if (value == 1) { //季
                this.workText = "本季工作计划";
                this.planText = "下季工作计划";
                const beginDate = getDate.getCurrQuarter().starttime;
                const endDate = getDate.getCurrQuarter().endtime;
                this.dateSting = [beginDate, endDate];
                this.dateSting = [beginDate, endDate];
                this.form.setFieldsValue({ formDate: [beginDate, endDate] });
                if (this.setData.length > 0) {
                    this.submitUserName = "";
                    this.ccUserIds = "";
                    this.ccUserNames = "";
                    this.deadlineText = "无限制";
                    // this.submitUserId = this.setData[0].submitId;
                    // this.submitUserName = this.setData[0].submitName;
                    // this.ccUserIds = this.setData[0].ccId;
                    // this.ccUserNames = this.setData[0].ccName;
                    // this.deadlineText = this.setData[0].deadlineText;
                }
            } else if (value == 2) { //周
                this.workText = "本周工作计划";
                this.planText = "下周工作计划";
                const beginDate = getDate.getCurrWeekDays().starttime;
                const endDate = getDate.getCurrWeekDays().endtime;
                this.dateSting = [beginDate, endDate];
                this.form.setFieldsValue({ formDate: [beginDate, endDate] });
                if (this.setData.length > 1) {
                    this.submitUserId = this.setData[1].submitId;
                    this.submitUserName = this.setData[1].submitName;
                    this.ccUserIds = this.setData[1].ccId;
                    this.ccUserNames = this.setData[1].ccName;
                    this.deadlineText = this.setData[1].deadlineText;
                }
            } else if (value == 3) { //月
                this.workText = "本月工作计划";
                this.planText = "下月工作计划";
                const beginDate = getDate.getCurrMonthDays().starttime;
                const endDate = getDate.getCurrMonthDays().endtime;
                this.dateSting = [beginDate, endDate];
                this.form.setFieldsValue({ formDate: [beginDate, endDate] });
                if (this.setData.length > 2) {
                    this.submitUserId = this.setData[2].submitId;
                    this.submitUserName = this.setData[2].submitName;
                    this.ccUserIds = this.setData[2].ccId;
                    this.ccUserNames = this.setData[2].ccName;
                    this.deadlineText = this.setData[2].deadlineText;
                }
            } else if (value == 4) { //年
                this.workText = "今年工作计划";
                this.planText = "明年工作计划";
                const beginDate = getDate.getCurrYear().starttime;
                const endDate = getDate.getCurrYear().endtime;
                this.dateSting = [beginDate, endDate];
                this.form.setFieldsValue({ formDate: [beginDate, endDate] });
                this.submitUserId = "";
                this.submitUserName = "";
                this.ccUserIds = "";
                this.ccUserNames = "";
                this.deadlineText = "无限制";
            } else {
                this.workText = "工作计划";
                this.planText = "下次工作计划";
                this.form.setFieldsValue({ formDate: null });
                this.dateSting = [];
                this.submitUserId = "";
                this.submitUserName = "";
                this.ccUserIds = "";
                this.ccUserNames = "";
                this.deadlineText = "无限制";
            }
        },
        //table分页触发
        onTableChange (pagination, filters, sorter) {
            Object.assign(this.postData, {
                current: pagination.current,
                size: pagination.pageSize
            });
            Object.assign(this.pagination, {
                current: pagination.current,
                pageSize: pagination.pageSize
            });
            this.PageList();
        },
        changePageSize (e) {
            const value = e.target.value;
            const { pagination } = this;

            console.log(e, value);
            Object.assign(this.postData, {
                size: value
            });
            Object.assign(this.pagination, {
                pageSize: Number.parseInt(value)
            });
            this.PageList();
        },
        reset () {
            this.postData = { ...basePostData };
        },
        onCellChange (key, dataIndex, value) {
            const dataSource = [...this.detailData];
            const target = dataSource.filter(item => key === item.key)[0];
            if (target) {
                target[dataIndex] = value;
                this.detailData = dataSource;
            }
        },
        //用户tree展开
        expanedChange (key, info) {
            this.expandedUserKeys = key;
        },
        //用户搜索
        onChange (e) {
            const value = e.target.value;
            console.log(value);
            if (value) {
                this.treeAShow = true;
                this.treeBShow = false;
                const keys = [];
                const treeData = searchInTreeData(
                    keys,
                    this.userAllData,
                    "title",
                    value
                );
                this.userSearchData = treeData;
                this.expandedUserKeys = keys;
            } else {
                this.treeAShow = false;
                this.treeBShow = true;
                //this.areaTreeData = treeAreaData;
                this.expandedUserKeys = [];
            }
        },
        uploadFile (info) {
            let fileList = [...info.fileList];
            fileList = fileList.map(file => {
                if (file.response) {
                    file.url = file.response.url;
                    file.id = file.response.id;
                }
                return file;
            });
            this.fileList = fileList;
        },
        dateChange (date, dateString) {
            console.log("dateString", dateString);
            this.dateSting = dateString;
        },
        //撤回计划
        returnPlan () {
            if (this.selectedKeys.length != 1) {
                this.$message.warning('请选择一条数据');
                return;
            }
            let row = this.selectedData[0];
            let _this = this;
            this.$confirm({
                title: '提示',
                content: '您确定要撤回该计划吗？',
                onOk () {
                    row.status = 0;
                    returnPlan({ id: row.id }).then(res => {
                        if (res.code == 200) {
                            _this.$message.success("撤回计划成功");
                            _this.PageList();
                        } else {
                            // _this.$message.warning(res.message);
                        }
                    });
                },
                onCancel () {
                },
            });
        },
        //审核/驳回 计划
        approval (val) {
            if (this.selectedKeys.length < 1) {
                this.$message.warning("请至少选择一条数据");
                return;
            }
            const plans = this.selectedData;
            for (let i = 0; i < plans.length; i++) {
                if (plans[i].finishStatus) {
                    this.$message.warning("请选择未存档的数据");
                    return;
                }
                plans[i].readStatus = val;
                plans[i].createDate = null;
                plans[i].submitDate = null;
                plans[i].myEvaluationDate = null;
                plans[i].evaluationDate = null;
            }
            let _this = this;
            this.$confirm({
                title: '提示',
                content: <span>是否确定{<span style='color:red;'>驳回</span>}？</span>,
                onOk () {
                    approval(plans).then(response => {
                        if (response.code == 200) {
                            _this.submitVisible = false;
                            _this.$message.success("驳回成功");
                            _this.selectedKeys = [];
                            _this.selectedData = [];
                            _this.PageList();
                        } else {
                            _this.PageList();
                            // _this.$message.warning(response.message);
                        }
                    });
                },
                onCancel () { },
            });


        },
        archiveHandler () {
            //存档
            if (this.selectedKeys.length < 1) {
                this.$message.warning("请至少选择一条数据");
                return;
            }
            let d = this.selectedData;
            for (let i = 0; i < d.length; i++) {
                if (d[i].finishStatus) {
                    this.$message.warning("请选择未存档的数据");
                    return;
                }
            }

            let _this = this;
            this.$confirm({
                title: '提示',
                content: <span>存档过后不能做任何更改，确定{<span style='color:red;'>存档</span>}吗？</span>,
                onOk () {
                    finishApi(_this.selectedKeys).then(response => {
                        if (response.code === 200) {
                            _this.$message.success("存档成功");
                            _this.selectedKeys = [];
                            _this.selectedData = [];
                            _this.PageList();
                        } else {
                            // _this.$message.warning(response.message);
                        }
                    }).catch(err => {
                        _this.$message.warning(err.message);
                    });
                },
                onCancel () { },
            });
        }
    },
    watch: {}
};
</script>
<style scoped lang="less">
    .form-inline label {
        justify-content: left !important;
    }

    .ant-advanced-search-form {
        padding: 24px;
        background: #fbfbfb;
    }

    .ant-advanced-search-form .ant-form-item {
        display: flex;
    }

    .ant-advanced-search-form .ant-form-item-control-wrapper {
        flex: 1;
    }

    #components-form-demo-advanced-search .ant-form {
        max-width: none;
    }
    #components-form-demo-advanced-search .search-result-list {
        margin-top: 16px;
        background-color: #fafafa;
        min-height: 800px;
        text-align: center;
        padding-top: 80px;
    }

    /* tile uploaded pictures */
    .ant-popover-inner {
        z-index: 2999;
    }
    .div-line {
        width: 100%;
        height: 2px;
        background: #1890ff;
    }
    .search-bn {
        width: 80px;
        height: 35px;
        margin-left: 15px;
        display: block;
        text-align: center;
        line-height: 35px;
        float: left;
        cursor: pointer;
    }

    .ant-advanced-search-form .ant-form-item {
        display: flex;
        margin-bottom: 0px !important;
    }
</style>
<style lang="less">
    @import '~@/style/work.less';
</style>
